<template>
  <div>
    <span class="hotSearch">热门搜索</span>
    <section class="hotSearchList">
      <aside v-for="el in hotSearch" :key="el.id" @click="getDoctors(el)">
        <i-tag class="i-tags" :name="el.name" color="blue">{{el.name}}</i-tag>
      </aside>
    </section>
  </div>
</template>

<script>
export default {
  props: {
    hotSearch: Array
  },
  methods: {
    getDoctors(value) {
      this.$router.push({
        query: value
      });
    }
  }
};
</script>

<style lang="scss" scoped>
.hotSearch {
  display: inline-block;
  padding: 0 20rpx;
  line-height: 60rpx;
  height: 60rpx;
  width: 100%;
  font-size: 24rpx;
  background-color: #fafafa;
  color: #898989;
  box-sizing: border-box;
}
.hotSearchList {
  color: #666666;
  display: flex;
  padding: 20rpx;
  flex-wrap: wrap;
  border-top: 1px solid #e1e1e1;
  aside {
    margin: 0 14rpx 8rpx 0;
  }
}
</style>